<%@ page import="java.util.ArrayList" %>
<%@ page import="com.po.GoodsSingle" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%!
    static ArrayList goodlist = new ArrayList();
    static {
        String[] names={"《哈利波特与魔法石》","《哈利波特与密室》","《哈利波特与阿兹卡班的囚徒》","《哈利波特与火焰杯》","《哈利波特与凤凰社》","《哈利波特与混血王子》","《哈利波特与死亡圣器》"};
        float[] prices={28.5f,24.5f,30f,36.8f,33.3f,34.4f,36.6f};
        for (int i=0;i<names.length;i++){
            GoodsSingle temp = new GoodsSingle();
            temp.setName(names[i]);
            temp.setNum(1);
            temp.setPrice(prices[i]);
            goodlist.add(i,temp);
        }
    }
%>
<%
    session.setAttribute("goodslist",goodlist);
    response.sendRedirect("show.jsp");
%>